#include <iostream>
using namespace std;
template <class T1,class T2>
class myclass1
{
public:
    T1 m_x;
    T2 m_y;
    myclass1(T1 x,T2 y):m_x(x),m_y(y){
        cout<<"myclass1的构造函数"<<endl;
    }
    void show(){
        cout<<"m_x:"<<m_x<<" "<<"m_y:"<<m_y<<endl;
    }
};
template <class T1,class T2>
class myclass2:public myclass1<T1,T2>{
public:
    T1 m_a;
    T2 m_b;
    myclass2(T1 x1,T1 x2,T2 y1,T2 y2):myclass1<T1,T2>(x1,y1),m_a(x2),m_b(y2){
        cout<<"myclass2的构造函数"<<endl;
    }
    void show(){
        myclass1<T1,T2>::show();
        cout<<"m_a:"<<m_a<<" "<<"m_b:"<<m_b<<endl;
    }
};
int main()
{
    myclass2<string,int> a("张三","李四",10,20);
    a.show();
    return 0;
}